package com.lcifn.spring.ioc.scan;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.stereotype.Component;

@Component
public class SimpleMergedBeanDefinitionPostProcessor implements MergedBeanDefinitionPostProcessor{

    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("SimpleMergedBeanDefinitionPostProcessor postProcessBeforeInitialization:" + beanName);
        return bean;
    }

    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("SimpleMergedBeanDefinitionPostProcessor postProcessAfterInitialization:" + beanName);
        return bean;
    }

    public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
        System.out.println("SimpleMergedBeanDefinitionPostProcessor postProcessMergedBeanDefinition:" + beanName);
    }

}
